package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.acticle.domain.Strategy;
import cn.wolfcode.luowowo.acticle.domain.StrategyDetail;
import cn.wolfcode.luowowo.acticle.query.StrategyDetailQuery;
import cn.wolfcode.luowowo.acticle.vo.StrategyStatisVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyDetail record);

    StrategyDetail selectByPrimaryKey(Long id);

    List<StrategyDetail> selectAll();

    int updateByPrimaryKey(StrategyDetail record);

    List<StrategyDetail> selectForList(StrategyDetailQuery qo);


    void insertRelation(@Param("detailId") Long detailId, @Param("tagId") Long tagId);

    void deleteRelation(Long id);

    List<StrategyDetail> selectByViewnumTop3(Long destId);

    void updateStateById(@Param("id") Long id, @Param("state") Long state);

    void updateReplyNumByDetailId(@Param("detailId") Long detailId, @Param("num") int num);

    void updateStatisByVo(StrategyStatisVO vo1);

    StrategyDetail getByStrategyId(Long strategyId);
}